package com.electromagnetic.industry.software.manage.pojo.models;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.electromagnetic.industry.software.common.util.EleIdCreator;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("ed_role") // 指定表名
public class Role extends BaseModel {

    private String id;

    /**
     * 角色名称
     */
    @TableField(value = "role_name")
    private String roleName;

    /**
     * 角色描述
     */
    @TableField(value = "role_desc")
    private String roleDesc;

    public void newInit() {
        this.setId(EleIdCreator.createSnowflakeId());
    }
}

